#include <iostream>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int main()
{
    int n, m; cin >> n >> m;
    cin >> a[1];
    int t = 1;
    for (int i = 2; i <= n; i++)
    {
        cin >> a[i];
        if (a[i] - a[i - 1] > m) t = 1;
        else t++;
    }
    cout << t << endl;
    return 0;
}